package com.ict.system.config;


import com.ict.system.service.MinioTemplate;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import lombok.AllArgsConstructor;

/**
 * minio 自动配置类
 *
 * @author Lewin
 */
@AllArgsConstructor
@Configuration
public class MinioAutoConfiguration {
	private final MinioProperties properties;

	@Bean
    MinioTemplate template() {
		return new MinioTemplate(properties.getUrl(), properties.getAccessKey(), properties.getSecretKey());
	}

}
